//////////////////////////////////////////////////////////////////////////
//
// GAM203
// Sound Sample
// SoundSample.h
// 
// Scott Taylor
// Qantm College
//
//////////////////////////////////////////////////////////////////////////

#ifndef SOUNDSAMPLE_H
#define SOUNDSAMPLE_H

struct FSOUND_SAMPLE;

// A little @HACKy but avoids an unnecessary #include
#ifndef NULL
#define NULL 0
#endif

class SoundSample
{
public:
  static const int FILENAME_LEN = 256;

  SoundSample(const char* a_pFilename, bool a_is3d);
  ~SoundSample();

  bool IsValid() const { return (m_pSample != NULL); }

  inline FSOUND_SAMPLE* GetHandle() { return m_pSample; }
  inline const FSOUND_SAMPLE* GetHandle() const { return m_pSample; }

  int GetErrorCode() const { return m_errorCode; }

  const char* GetFilename() const { return m_filename; }

private:
  FSOUND_SAMPLE* m_pSample;  // Loaded sample
  int m_errorCode;
  char m_filename[FILENAME_LEN];
};

#endif  // SOUNDSAMPLE_H

